package cn.dianhun.om.jpa.repository;

import cn.dianhun.om.jpa.pojo.SysMenuEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author cyt
 * @create 2020-07-08 15:44
 */
@Repository
public interface MenuDao extends JpaRepository<SysMenuEntity, Long> {
    //使用 @ query 查询所有
    @Query(value = "select * from sys_menu", nativeQuery = true)
    List<SysMenuEntity> getAll();
}
